package Controller;

import java.awt.Color;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;

import View.PanelAccountView;
import View.PanelHolder;
import View.PanelAccountDetail;
import Custom.*;

public class accountMouseListener implements MouseListener {
	
	private AccountLayout aa;
	private Color background = new Color(105, 105, 105);
	private Color mouseOver = new Color(189, 188, 187);

	public accountMouseListener(Custom.AccountLayout AA) {
		aa = AA;
	}

	public void mouseReleased(MouseEvent arg0) {

		aa.setBackground(Color.gray);
		PanelHolder mf = PanelHolder.getInstance();
		mf.remove(PanelAccountView.getInstance());
		mf.add(PanelAccountDetail.getInstance());
		mf.repaint();
		mf.validate();
	}

	public void mousePressed(MouseEvent arg0) {

	}

	public void mouseExited(MouseEvent arg0) {
		aa.setBackground(background);
	}

	public void mouseEntered(MouseEvent arg0) {
		aa.setBackground(mouseOver);
		
	}

	public void mouseClicked(MouseEvent arg0) {

	}
}
